add_rules("mode.debug", "mode.release")
set_symbols("debug")

-- 添加xmake.lua文件
includes("src", "example")

-- 拷贝项目文件到bin目录
after_build(function(target)
	local outputdia = target:targetdir()
	local targetfile = target:targetfile()

	local bindir = path.join(os.projectdir(), "bin")

	os.mkdir(bindir)

	os.cp(targetfile, bindir)

	if target:kind() == "binary" then
		local deps = target:orderdeps()
		for _, dep in ipairs(deps) do
			if dep:kind() == "shared" then
				local depfile = dep:targetfile()
				os.cp(depfile, bindir)
			end
		end
	end
end)
